package org.example;

import java.util.HashSet;
import java.util.Set;

public class TestClass {

    public static void main(String[] args) {
        Set<String> set = new HashSet<>();
        set.add("A");
        set.add("B");
        set.add("C");
        System.out.println("初始集合: " + set);

        boolean isRemoved = set.remove("B");
        System.out.println("删除B是否成功: " + isRemoved);
        System.out.println("删除后的集合: " + set);
    }

}
